package com.zy.userapp.controller;

import com.zy.userapp.service.CouponService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestControllor {

    @Autowired
    private CouponService couponService;

    @RequestMapping("/test")
    public String test(){
        return "111";
    }

    @RequestMapping("/test1")
    public String testQuery(String id){
        if(id==null){
            return "";
        }
        return couponService.query();
    }

    @RequestMapping("/test2")
    public String testQuery2(){
        return couponService.query();
    }

}
